package cn.tedu.spring.exercise;

import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author ruoLi
 */
public class TestProduct {
    ApplicationContext context = new ClassPathXmlApplicationContext("bean-product.xml");

    @Test
    public void SpringTest() {
        Product product = context.getBean("product1",Product.class);
        System.out.println(product);
    }

    @Test
    public void ConsTest() {
        Product product=context.getBean("product2", Product.class);
        System.out.println(product);
    }
}
